﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LIMS.Entities;
using LIMS.DataAccess;
using System.Collections;
using System.Reflection;
using Castle.Core.Logging;
using NHibernate.Criterion;

namespace LIMS.Service
{
    public class AuditTrailService : IAuditTrailService
    {
        //Private DBA interfaces
        private IDaoFactory oDBFactory;
        private IAuditTrailDAO oAuditTrailDBA;
        private ILogger logger;

        //Constructor
        public AuditTrailService(IDaoFactory oDBOp, ILogger oLogger)
        {
            this.oDBFactory = oDBOp;
            this.oAuditTrailDBA = oDBFactory.GetAuditTrailDAO();
            this.logger = oLogger;
        }


        #region IAuditTrailService Members
        /// <summary>
        /// save audit trail
        /// </summary>
        /// <param name="oAuditTrail"></param>
        /// <returns></returns>
        public bool Save(AuditTrail oAuditTrail)
        {
            return oAuditTrailDBA.QuickSaveOrUpdate(ref oAuditTrail);
        }

        #endregion
    }
}
